refactor: ImageInstanceManager#mapImage#244
Merged
coding-jjun merged 2 commits intomainfrom Mar 16, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 제목:
펀딩 및 이미지 매핑 로직 개선 및 리팩토링
PR 내용:
펀딩 목록 조회 및 이미지 매핑 로직을 개선하여 코드의 가독성을 높이고, 불필요한 변수 선언 및 중복 로직을 제거하였습니다.
주요 변경 사항:
펀딩 목록 조회 최적화
funding.fundUser필터링 로직을 간소화.friendIdsArray변수 선언 제거.friendIds조회 시userId를 재사용하여 코드 간결화.이미지 매핑 개선
ImageInstanceManager#mapImage를 활용하여 네스팅된 엔티티에서도 이미지 매핑 가능하도록 개선.leftJoinAndMapOne을 직접 사용하는 대신mapImage를 호출하도록 변경.mapImages메서드 개선idField및imgType을 동적으로 결정하도록 개선.leftJoinAndMapMany를 활용하여 여러 이미지를 한 번에 매핑 가능하도록 변경.defaultImgId가 존재할 경우imgId를, 없을 경우subId와imgType을 활용해 매핑.기대 효과:
ImageInstanceManager를 통해 이미지 매핑을 보다 일관성 있게 수행 가능.검토 후 피드백 부탁드립니다! 🚀